package service;

import java.util.ServiceLoader;

/**
 * @author daxue0929
 * @date 2023/4/25
 */

public class ServiceTest {
    public static void main(String[] args) {

        ServiceLoader<PrintWord> serviceLoader = ServiceLoader.load(PrintWord.class);
        serviceLoader.forEach(printWord -> printWord.print("test"));

    }
}
